-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(add-xy_shape): Ability to use xy_shape field type #885
feat(add-xy_shape): Ability to use xy_shape field type #885
Conversation
1bf9197
to
4ace680
Compare
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
4ace680
to
d4a64ac
Compare
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
b4630b7
to
3505e64
Compare
java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/FieldType.java
Outdated
Show resolved
Hide resolved
java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/XyShapeProperty.java
Show resolved
Hide resolved
java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/XyShapeQuery.java
Outdated
Show resolved
Hide resolved
...lient/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/XyShapeFieldQuery.java
Outdated
Show resolved
Hide resolved
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
e363511
to
8c77c9e
Compare
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
e73b946
to
7095e38
Compare
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
7095e38
to
e1cda72
Compare
java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java
Show resolved
Hide resolved
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
d175588
to
c877a66
Compare
@dblock any concerns from your side? thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your conversation around license. The XyShapeQuery
code looks suspiciously like the existing ShapeQuery
code, so I am afraid we need to put back the Elastic license header in there. Even if they refer to two different concepts, I think we should be safe vs. sorry.
Hi @dblock
|
@kmessaoudi I think what @dblock means is that: for new files - the header is correct (SPDX one), but for modified files (which also included renamed like Shape -> XyShape) would be more correct to preserve the original license header. |
Yes, please. Sorry for being annoying and appreciate your work! |
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
@@ -0,0 +1,14 @@ | |||
package org.opensearch.client.opensearch._types.query_dsl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one needs a license header too (only SPDX for the new file, but this one does look like a copy of the old ShapeFieldQueryTest. CI should be catching the missing one - if it's not and it's not a trivial fix, open a GH issue please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I've checked the other files in test directory before pushing, they don't have license header ?
It is indeed a copy of ShapeFieldQueryTest, the header wasn't there before, is that normal ?
I am not sure to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if I wasn't clear.
- It should have been there and CI should have caught this as a problem before.
- Please do add it, including the ES one since it's an old file.
- We need to make sure license checker catches this in CI, if the problem is not obvious (excluded folder or something), please open an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed a copy of ShapeFieldQueryTest, the header wasn't there before, is that normal ?
I am not sure to understand
@kmessaoudi oh this seems like a miss on our side, thank you for pointing it out, I believe we need to have license headers there, @VachaShah may be it rings a bell to you?
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-885-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ccdb56a31dca1184b29b3948ee66835df5681dd0
# Push it to GitHub
git push --set-upstream origin backport/backport-885-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
@kmessaoudi I merged the PR. Looks like automatic backport failed, want to do a manual one to the 2.x branch so we can have this in a 2.x release? |
…oject#885) * feat(add-xy_shape): Ability to use xy_shape field type Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * update changelog Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Fix changelog and add license header Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * updated license header Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * remove shape property Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * fix test after removing shape Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * adapt ShapeQuery test to XyShapeQuery Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Add ES license headers Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Add ES license headers on tests Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> --------- Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> (cherry picked from commit ccdb56a)
* feat(add-xy_shape): Ability to use xy_shape field type Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * update changelog Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Fix changelog and add license header Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * updated license header Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * remove shape property Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * fix test after removing shape Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * adapt ShapeQuery test to XyShapeQuery Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Add ES license headers Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> * Add ES license headers on tests Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> --------- Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com> (cherry picked from commit ccdb56a)
Description
Currently when using the
shape
property with the opensearch java client, this result as an error as it is known to OpenSearch, where this feature has the namexy_shape
.We were unsure of
shape
usage and didn't know if we should have removed it.This PR adds the ability of using Xy shape property.
Issues Resolved
Fixes #884